#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIApplication.h>
#import <UIKit/UIPushButton.h>
#import <UIKit/UITableCell.h>
#import <UIKit/UIImageAndTextTableCell.h>
#import <UIKit/UIPageIndicator.h>
#import "FretBoardView.h"
#import "ScalesView.h"
#import "PrefsView.h"
#import "ApplicationState.h"

@class FretBoardView;
@class ScalesView;
@class PrefsView;
@class ApplicationState;

@interface ChordsApplication : UIApplication 
{
	UIWindow *window;
	UITransitionView *transitionView;
	UIView *mainView;
	FretBoardView *fretboardView;
	PrefsView	*prefsView;
	ScalesView *scalesView;
	ApplicationState *applState;
	UINavigationBar *nav;
	int fromView;
	int currentView;
}

+ (ChordsApplication *)sharedInstance;

- (void)showView:(id)view withTransition:(int)transition;
- (void)doAnimationOfType:(NSString *)type;
- (void)showFretBoardView:(int)transition;
- (void)showPrefsView:(int)transition;
- (void)showScalesView:(int)transition;
- (void)changeNotation;
- (ApplicationState*)getApplState;
- (void)setNavBar:(int)view;
- (float)getNotationValue;
- (void)showAboutPopUp;


// DELEGATE METHODS
- (void)alertSheet:(UIAlertSheet*)sheet buttonClicked:(int)button;
- (void)applicationWillSuspend;


typedef enum {
	kUIControlEventMouseDown = 1 << 0,
	kUIControlEventMouseMovedInside = 1 << 2,
	kUIControlEventMouseMovedOutside = 1 << 3,
	kUIControlEventMouseUpInside = 1 << 6,
	kUIControlEventMouseUpOutside = 1 << 7, 
	kUIControlAllEvents = (kUIControlEventMouseDown | kUIControlEventMouseMovedInside | kUIControlEventMouseMovedOutside | kUIControlEventMouseUpInside | kUIControlEventMouseUpOutside)
} UIControlEventMasks;

#define DELTA -42.0f
#define DELTA_BUTTON 160.0f

#define FRETBOARDVIEW 1
#define SCALESVIEW 2
#define PREFSVIEW 3

@end
